Ext.define('Admin.view.system.msg.Place', {
	extend: 'Admin.ux.PageGrid',
    xtype: 'place-view',
    title: '常用地点管理',
    viewModel:{
    	stores: {
    		data: {
			    type: 'place-store',
			    autoLoad: true
			}
		  },
		  data:{
		    	batchRemoveAction : true,
		    	batchRemoveText:'批量删除(0)'
		  }
    },
    controller:'place',
    listeners: {
        selectionchange: 'onSelectionChange'
    },
 	columns: [
	 	{ xtype: 'rownumberer',width:'10%'},
	 	{ xtype:'gridcolumnview',width:'70%', text: '地点名',width:120, dataIndex: 'place_name'}, 
	 	{ xtype:'gridcolumnview', text: '排序',width:'7%', dataIndex: 'number'}, 
	    {
	        menuDisabled: true,
	        sortable: false,
	        xtype: 'actioncolumn',
	        width: '8%',
	        text:'操作',
	        items: [
				{
				    iconCls: 'array-grid-buy-col',
				    tooltip: '编辑',
				    handler:'editAction'
				},
				'-',
				{
				    iconCls: 'array-grid-sell-col',
				    tooltip: '删除',
				    handler: 'removeAction'
				}
				]
	    }
	],

    tbar:[
		{
			text:'新增地点',
			iconCls: 'x-fa fa-plus',
			handler:'addAction'
		},
		{
    		iconCls: 'x-fa fa-minus',
	    	handler:'batchRemoveAction',
	    	bind:{
    			disabled :'{batchRemoveAction}',
    			text:'{batchRemoveText}'
    		}
    	}
	]
});